describe("TestLoad", function () {
  
	 var nameConstants = {
        menuItems: "menuItems",
        order: "order",
    };
	
	var menuJSON = 	{
                categoryName: "Steaks",
                data: [
                    { id: 20001, name: "steak df g", price: 66.59, time: 6, description: "some text goes here", imgSrc: "img/steak.png" },
                    { id: 20002, name: "steak dfs ", price: 4.59, time: 7, description: "some text goes here", imgSrc: "img/steak.png" },
                    { id: 20003, name: "steak sd f", price: 7.59, time: 8, description: "some text goes here", imgSrc: "img/steak.png" },
                    { id: 20004, name: "steak fd gsd", price: 9.59, time: 9, description: "some text goes here", imgSrc: "img/steak.png" },                    
                ]
            }				
        
  
	beforeEach(function () {	 
    localStorage.clear();
	server.saveData(nameConstants.menuItems, menuJSON);
  });

    it("TestLoadMenuItems", function() {			
	var loadedMenu = server.loadData(nameConstants.menuItems);
    expect(JSON.stringify(menuJSON) === JSON.stringify(loadedMenu)).toEqual(true);
  }); 
  
   it("TestLoadDataNoObjectName", function() {
    expect(function(){server.loadData()}).toThrow(TypeError("dataObjectName is not specified"));
  });  

	it("TestLoadDataEmptyObjectName", function() {
    expect(function(){server.loadData("")}).toThrow(TypeError("dataObjectName is not specified"));
  });   
  
  it("TestLoadDataEmptyObjectName", function() {
    expect(function(){server.loadData("")}).toThrow(TypeError("dataObjectName is not specified"));
  });  

	it("TestLoadDataLoadInvalidObject", function() {	
    expect(function(){server.loadData("InvaLiDDaTa")}).toThrow(TypeError("dataObject was not loaded correctly"));
  });    
  
});